<template>
  <div class="agreement">
    <div class="title">
      <div class="avatar"><img :src="avatarimg" alt="" /></div>
      <div class="information">
        <div class="information_name">*星宇</div>
        <div class="information_tel">18721212145</div>
      </div>
      <img
        class="close_img"
        src="@/assets/img/个人中心/形状 4 拷贝.png"
        alt=""
      />
      <div class="balance">
        <span class="balance_mes">账户余额：￥{{ money }}</span>
        <button class="recharge" @click="recharges">充值</button>
      </div>
    </div>
    <div class="content">
      <div class="list" v-for="(item, index) in list" :key="index">
        <img class="list_img lb" :src="item.img" alt="" />
        <div class="list_title lb">{{ item.title }}</div>
        <div class="list_hint lb">{{ item.hint }}</div>
        <img class="continue lb" :src="continueimg" alt="" />
      </div>
    </div>
    <div class="service"><p>服务热线：400-168-1733</p></div>
  </div>
</template>

<script>
import { quanju } from '@/api/message/login_ele'
import { agreementtitle } from '@/api/agreement.js'
export default {
  created() {
    quanju()
      .then((res)=>{
return res
      })
    agreementtitle().then((res) => {
      console.log(res.data)
      this.list = res.data
    })
  },
  data() {
    return {
      money: '0.00',
      continueimg: require('@/assets/img/个人中心/形状 4 拷贝.png'),
      avatarimg: '',
      list: []
    }
  },
  methods: {
    recharges() {
      console.log(1)
    }
  }
}
</script>
<style lang="less" scoped>
// 公用行块级样式
.lb {
  display: inline-block;
  vertical-align: top;
}
.agreement {
  height: 100%;
  width: 100%;
  background-color: #f5f5f5;
  .title {
    overflow: hidden;
    height: 8.2667rem;
    background: linear-gradient(to right, #ed1a21, #fd7d70);
    .avatar {
      display: inline-block;
      vertical-align: top;
      width: 2.6667rem;
      height: 2.6667rem;
      margin-top: 1.6rem;
      margin-left: 1.0667rem;
      background-color: antiquewhite;
      border-radius: 50%;
      img {
        margin-top: 0.4rem;
        margin-left: 0.35rem;
        width: 85%;
        height: 85%;
      }
    }
    .information {
      display: inline-block;
      vertical-align: top;
      width: 4.2933rem;
      height: 1.8667rem;
      line-height: 1.8667rem;
      margin: 1.6rem 0 1.9733rem 1.0667rem;

      color: #ffffff;
      .information_name {
        height: 50%;
        font-size: 0.8rem;
      }
      .information_tel {
        color: #dbdbdb;
        font-size: 0.7rem;
        height: 50%;
      }
    }
    .close_img {
      margin-top: 2.48rem;
      margin-left: 9.6rem;
      width: 0.56rem;
      height: 0.9067rem;
    }
    .balance {
      display: flex;
      align-items: center;
      height: 2.4rem;
      width: 18.4rem;
      margin-left: 0.8rem;
      margin-top: 0.4267rem;
      background-color: #f79185;
      border-radius: 0.2667rem 0.2667rem 0 0;
      .balance_mes {
        height: 0.6667rem;
        width: 8rem;
        text-align: left;
        font-size: 0.6933rem;
        color: #fff;
        margin-left: 0.8rem;
      }
      .recharge {
        margin-left: 5.8667rem;
        width: 2.9333rem;
        height: 1.3333rem;
        display: inline-block;
        background-color: #ed1a21;
        border-radius: 0.6667rem;
        font-size: 0.6933rem;
        color: #fff;
        cursor: pointer;
      }
    }
  }
  .content {
    position: relative;
    width: 100%;
    height: 13.3334rem;
    background-color: #ffffff;
    margin-top: 0.8rem;
    .list {
      display: flex;
      align-items: center;
      height: 2.6667rem;
      font-size: 0.6933rem;
      .list_img {
        width: 1.0667rem;
        height: 1.0667rem;
        margin-left: 0.8rem;
      }
      .list_title {
        margin-left: 0.8rem;
        color: #212121;
        height: 0.6667rem;
        line-height: 0.6667rem;
      }
      .list_hint {
        font-size: 0.6933rem;
        width: 200px;
        color: #999999;
        text-align: right;
        position: absolute;
        right: 2rem;
      }
      .continue {
        width: 0.32rem;
        height: 0.5333rem;
        position: absolute;
        right: 0.8rem;
        background: #aaaaaa;
      }
    }
  }
  .service {
    position: relative;
    height: 12rem;
    width: 100%;
    P {
      font-size: 0.5867rem;
      color: #666666;
      width: 100%;
      text-align: center;
      position: absolute;
      bottom: 1.3333rem;
    }
  }
}
</style>
